package api

import (
	"github.com/gin-gonic/gin"
	"goshell.straysh.com/internal/api"
	"goshell.straysh.com/internal/ioc"
)

func registerRoutesV1(r *gin.RouterGroup) {
	svc := api.NewWorkerService(ioc.Config(), ioc.Logger())
	r.GET("ws", func(c *gin.Context) {
		svc.Websocket(c)
	})

	ansibleSvc := api.NewAnsibleService(ioc.Config(), ioc.Logger())
	r.POST("ansible", func(c *gin.Context) {
		ansibleSvc.Playbook(c)
	})
}
